B = Buffer
C = Calculation functions
The BC10PopBuf function extracts a value from a ring buffer. Each time the latter function makes sure to extract from the circular buffer queue the first data entered and than place it in a variable.
BC10PopBuf (Buffer, Element, ErrorCode)
Parameters:
| IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
|---|---|---|---|---|
| IN | ARRSYS | Buffer | B/W/L/S | Array containing the Buffer |
| OUT | GLOBAL | Element | L/S | Variable on which you place the value retrieved from the buffer |
| OUT | GLOBAL | ErrorCode | F | Variable containing the error possibly occurred during insertion of the value |
After calling the function if there are any errors the error variable (ErrorCode) take the following values:
0 - No error
1 - Empty Buffer
Extracts an data by the buffer queue and puts it in the “glDato” variable each front of the “gfExtract” variable
MAIN:
IF gfExtract
gfExtract = 0
BC10PopBuf (Buffer, Element, ErrorCode)
IF NOT ErrorCode
glDato = Element
ENDIF
ENDIF